package com.ruoyi.enterprise.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.enterprise.mapper.SJobMapper;
import com.ruoyi.enterprise.domain.SJob;
import com.ruoyi.enterprise.service.ISJobService;

/**
 * 企业岗位信息Service业务层处理
 * 
 * @author jeffery
 * @date 2021-08-31
 */
@Service
public class SJobServiceImpl implements ISJobService 
{
    @Autowired
    private SJobMapper sJobMapper;

    /**
     * 查询企业岗位信息
     * 
     * @param jobId 企业岗位信息主键
     * @return 企业岗位信息
     */
    @Override
    public SJob selectSJobByJobId(Long jobId)
    {
        return sJobMapper.selectSJobByJobId(jobId);
    }

    /**
     * 查询企业岗位信息列表
     * 
     * @param sJob 企业岗位信息
     * @return 企业岗位信息
     */
    @Override
    public List<SJob> selectSJobList(SJob sJob)
    {
        return sJobMapper.selectSJobList(sJob);
    }

    /**
     * 新增企业岗位信息
     * 
     * @param sJob 企业岗位信息
     * @return 结果
     */
    @Override
    public int insertSJob(SJob sJob)
    {
        sJob.setCreateTime(DateUtils.getNowDate());
        return sJobMapper.insertSJob(sJob);
    }

    /**
     * 修改企业岗位信息
     * 
     * @param sJob 企业岗位信息
     * @return 结果
     */
    @Override
    public int updateSJob(SJob sJob)
    {
        sJob.setUpdateTime(DateUtils.getNowDate());
        return sJobMapper.updateSJob(sJob);
    }

    /**
     * 批量删除企业岗位信息
     * 
     * @param jobIds 需要删除的企业岗位信息主键
     * @return 结果
     */
    @Override
    public int deleteSJobByJobIds(Long[] jobIds)
    {
        return sJobMapper.deleteSJobByJobIds(jobIds);
    }

    /**
     * 删除企业岗位信息信息
     * 
     * @param jobId 企业岗位信息主键
     * @return 结果
     */
    @Override
    public int deleteSJobByJobId(Long jobId)
    {
        return sJobMapper.deleteSJobByJobId(jobId);
    }

    @Override
    public List<SJob> selectJobByCompanyId(Long companyId) {
        return sJobMapper.selectJobByCompanyId(companyId);
    }
}
